package com.ktjiaoyu.crm.mapper;

import com.ktjiaoyu.crm.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserMapper extends JpaRepository<User,Long>,
        JpaSpecificationExecutor<User> {
    /**
     * 查询用户名为usrName,密码为usrPassword的用户
     * @param usrName
     * @param usrPassword
     * @return
     */
    public List<User> findByUsrNameAndUsrPassword(String usrName,String usrPassword);

    /**
     * 根据用户名查询用户对象
     * @param usrName
     * @return
     */
    public User findUserByUsrName(String usrName);

//    /**
//     * 登录
//     */
//    public User login(String usrName);
}
